/*
 * @Author: your name
 * @Date: 2021-12-17 22:18:14
 * @LastEditTime: 2021-12-19 22:49:38
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \项目所在\before\src\router\routeconfig.js
 */

/* 一级 */
import Page from '../pages/index.jsx'
import Details from '../pages/details/index.tsx'
import Login from '../pages/login/index.jsx'
import MapPage from '../pages/map/index.jsx'
import CityList from '../pages/citylist/index.jsx'

/* 二级 */
import Home from '../pages/home/index.jsx'
import List from '../pages/list/index.jsx'
import Profile from '../pages/profile/index.jsx'

const routes = [
  {
    from: "/",
    to: "/page/home",
  },
  {
    path: '/page',
    component: Page,
    meta: {
      root: '管理员',
    },
    children: [
      {
        path: "/home",
        title: "首页",
        icon: "shouye",
        component: Home,
        meta: {
          root: "管理员"
        }
      },
      {
        path: "/list",
        title: "找房",
        icon: "zhaofang",
        component: List,
        meta: {
          root: "管理员"
        }
      },
      {
        path: "/profile",
        title: "我的",
        icon: "wode",
        component: Profile,
        meta: {
          root: '管理员',
        }
      }
    ]
  },
  {
    path: "/details",
    title: "详情",
    component: Details,
    meta: {
      root: '管理员',
    }
  },
  {
    path: "/login",
    component: Login,
    meta: {
      root: '管理员',
    }
  },
  {
    path: "/map",
    component: MapPage,
    meta: {
      root: '管理员',
    }
  },
  {
    path: "/citylist",
    component: CityList,
    meta: {
      root: '管理员',
    }
  }
]

export default routes